//
//  MHHTTPService+Live.m
// MiaoCircle
//
//Created by acgera on 2018/4/9.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHHTTPService+Login.h"
#import "MHCircleHomeModel.h"
#import "MHCircleInfo.h"
#import "MHCircleMember.h"
#import "MHRecentStory.h"
#import "MHCircleTag.h"
#import "MHCoverModel.h"
#import "MHMoment.h"
#import "MHBlackModel.h"
#import "MHIllegalListModel.h"
#import "MHSerchMoment.h"
#import "MHQRCodeModel.h"
#import "MHCircleAllTags.h"
#import "MHMessageNotification.h"
#import "MHDiscoverHomeModel.h"
#import "MHBanner.h"
#import "MHHelperModel.h"
#import "MHshareRecent.h"
#import "MHDownLoadH5.h"
#import "MHSystemMessageModel.h"
#import "MHRewardActivityInfo.h"
#import "MHPurseDetail.h"
#import "MHPurseInfo.h"
#import "MHCarhOprtInfo.h"
#import "MHCashDetailInfo.h"
#import "MHPriceRange.h"
#import "MHSearchCircleModel.h"
#import "MHAttributeModel.h"
#import "MHAwemeModel.h"
#import "MHNearByModel.h"
#import "MHInitalLocationModel.h"
#import "MHFuQian.h"
#import "MHBindInviterModel.h"
#import "MHCircleSimpleInfo.h"
@implementation MHHTTPService (Circle)

//第三方登录
-(RACSignal *) fetchHomeCircleDataWithPageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_PAGELIST parameters:subscript.dictionary];
    /// 3.发起请求
    return [[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleHomeModel class]];
}

-(RACSignal *) loginByWithAccout:(NSString *)account password:(NSString*) password
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"telephone"] = account;  //@"18579188622";//@"18579181234"; //
    subscript[@"password"] = [password md5String];
    
//    subscript[@"telephone"] = @"18579188622";  //@"18579188622";//@"18579181234"; //
//    subscript[@"password"] = [@"123456" md5String];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:@"api/account/login" parameters:subscript.dictionary];
    /// 3.发起请求
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHUser class]];
}


-(RACSignal *) createCircleWith:(MHCircleInfo *) info;
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"category"] = @(info.category);
    subscript[@"payType"] = @(info.payType);
    subscript[@"attrId"] = @(info.attrId);
//    if (info.payType != MHCirclPayTypeFree) {
////    subscript[@"limitType"] = @(info.limitType);
//    subscript[@"price"] = @(info.price);
//    }
    
    subscript[@"limitType"] = @(info.limitType ?: 1);
    subscript[@"title"] =  info.title;
    subscript[@"price"] = @(info.joinPrice?:0);
    subscript[@"coverUrl"] = info.coverUrl;
    subscript[@"intro"] = info.intro;
    subscript[@"locationData"] = [info.location yy_modelToJSONString];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_ADDCIRCLE parameters:subscript.dictionary];
    /// 3.发起请求
    return [[MHHTTPRequest requestWithParameters:paramters] enqueueResultClass:[MHCircleInfo class]];
}

-(RACSignal *) deleteCommentWith:(int) commentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"commentId"] = @(commentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_DELETECOMMENT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:nil];
}



-(RACSignal *) fetchCircleInfoWithCircleId:(int )circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCIRCLEINFO parameters:subscript.dictionary];
    /// 3.发起请求
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleInfo class]] mh_parsedResults];
}

-(RACSignal *) updateCircleInfoWithInfo:(MHCircleInfo *)info{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(info.autoId);
    subscript[@"attrId"] = @1;
    subscript[@"title"] = info.title;
//    subscript[@"price"] = @(info.joinPrice ?: 0);
    subscript[@"coverUrl"] = info.coverUrl;
    subscript[@"intro"] = info.intro;
    subscript[@"locationData"] = [info.location yy_modelToJSONString];
//    subscript[@"isShowLocation"] = @(info.isShowLocation);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPDATECIRCLEINFO parameters:subscript.dictionary];
    /// 3.发起请求
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleInfo class]];
}


/**
 更新圈子设置

 @param info 圈子信息
 @return 更新后返回的信号
 */
-(RACSignal *) updateCircleSettingWithInfo:(MHCircleInfo *)info{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(info.autoId);
    subscript[@"isCanFind"] = @(info.isPublic);
    subscript[@"isCanShare"] = @(info.isCanShare);
    subscript[@"isOpenMember"] = @(info.isOpenMember ?: 0);
    subscript[@"isNeedAudit"] =  @(info.isNeedAudit);
    subscript[@"publishAuth"] = @(info.publishAuth);
    subscript[@"joinPrice"] = @(info.joinPrice ?: 0);
    subscript[@"goOnPrice"] = @(info.goOnPrice);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPDATECIRCLESETTTING parameters:subscript.dictionary];
    /// 3.发起请求
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleInfo class]];
}



-(RACSignal *) fetchCircleMemberPagedListWithCircleId:(int )circleId roleId:(int) roleId pageNum:(int) pageNum pageSize:(int) pageSize searchTxt:(NSString *)searchTxt;
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"roleId"] = @(roleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    subscript[@"searchTxt"] = searchTxt;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCIRCLEMEMBERPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleMember class]] mh_parsedResults];
}


-(RACSignal *) getUserFullInfoWithuserId:(int)userId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"userId"] = @(userId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_PROFILE_USERFULLINFO parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHUser class]] mh_parsedResults];
}





-(RACSignal *) fetchBlackListWithCircleId:(int )circleId  pageNum:(int) pageNum pageSize:(int) pageSize;
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MEMBER_GETBLACKMEMBERPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleMember class]];
}







#warning 处理退出和加入的逻辑还存在问题
-(RACSignal *) exitCircleWithCircleId:(int) circleId
{

    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_EXITCIRCLE parameters:subscript.dictionary];
    
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) joinCircleWithCircleId:(int) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_JOINCIRCLE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleMember class]];
}


-(RACSignal *) fetchRecentStoryPagedListWithCircleId:(int )circleId userId:(int) userId isEssence:(int) isEssence  recentType:(int) recentType  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"userId"] = @(userId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    subscript[@"isEssence"] = @(isEssence);
    subscript[@"recentType"] = @(recentType);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETRECENTSTORYPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHMoment class]] mh_parsedResults];
}


-(RACSignal *) fetchUserExpePagedListWithUserId:(int) userId   pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"userId"] = @(userId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETUSEREXPEPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHMoment class]] mh_parsedResults];
}


-(RACSignal *) editCircleMemberQAinfoWithMemberId:(int )memberId txt:(NSString *)txt
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    subscript[@"txt"] = txt;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_EDITCIRCLEMEMBERQAINFO parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleMember class]] mh_parsedResults];
}


-(RACSignal *) getCircleQuestionerListWithCircleId:(int )circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCIRCLEQUESTIONERLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleMember class]] mh_parsedResults];
}





-(RACSignal *) fetchCollectMarkPagedListWithCircleId:(int )circleId   pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCOLLECTMARKPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHMoment class]] mh_parsedResults];
}



-(RACSignal *) getCommentPagedListWithRecentId:(int )recentId   pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCOMMENTPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHComment class]] mh_parsedResults];
}




//提问列表处理
-(RACSignal *) getUserAnswerPagedListWithCircleId:(int )circleId userId:(int) userId  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"userId"] = @(userId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETUSERQUESTIONPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHMoment class]] mh_parsedResults];
}
//getUserQuestionPagedList

-(RACSignal *) getUserQuestionPagedListWithCircleId:(int )circleId  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETUSERANSWERPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHMoment class]] mh_parsedResults];
}



-(RACSignal *) getIllegalList
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETILLEGALLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHIllegalListModel class]];
}


-(RACSignal *) getUserCircleTagListWithCircleId:(int) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_GETUSERCIRCLETAGLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleAllTags class]];
}


-(RACSignal *) addUserCircleTag:(int) circleId tagName:(NSString *) tagName
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"tagName"] = tagName;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_ADDUSERCIRCLETAG parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


-(RACSignal *) joinCircleWithCircleId:(int) circleId info:(NSString *) info
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"info"] = info;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_JOINCIRCLE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}




-(RACSignal *) deleteUserCircleTagWithTagId:(int) tagId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"tagId"] = @(tagId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_DELETEUSERCIRCLETAG parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleAllTags class]];
}


-(RACSignal *) getRecentStoryInfo:(int) recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETRECENTSTORYINFO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHMoment class]];
}


-(RACSignal *) reportRecentStoryWithRecentId:(int) recentId  reportTxt:(NSString *) reportTxt
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"reportTxt"] = reportTxt;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_REPORTRECENTSTORY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHIllegalListModel class]];
}

-(RACSignal *) uploadUserFaceWith:(NSString *)name  fileDatas:(NSArray *) data miniType:(NSString *)type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_UPLOAD_UPLOADUSERFACE parameters:subscript.dictionary];
    
    return [[[MHHTTPRequest requestWithParameters:paramters] enqueueUploadRequest:[MHUploadPicture class] fileDatas:data name:name mimeType:type] mh_parsedResults];
}



-(RACSignal *) UploadCircleCoverWith:(NSString *)name  fileDatas:(NSArray *) data miniType:(NSString *)type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPLOADCIRCLECOVER parameters:subscript.dictionary];
    
    return [[[MHHTTPRequest requestWithParameters:paramters] enqueueUploadRequest:[MHUploadPicture class] fileDatas:data name:name mimeType:type] mh_parsedResults];
}



-(RACSignal *) uploadDynamicImg:(NSString *)name  fileDatas:(NSArray *) data miniType:(NSString *)type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPLOADDYNAMICIMG parameters:subscript.dictionary];
    
    return [[[MHHTTPRequest requestWithParameters:paramters] enqueueUploadRequest:[MHUploadPicture class] fileDatas:data name:name mimeType:type] mh_parsedResults];
}




/**
 发布动态或者提问

 @param circleId 圈子ID
 @param content 内容
 @param data URL路径
 @param labels 标签
 @param recentType  动态类型：动态=1，提问=2
 @return 返回执行的信号
 */
-(RACSignal *) publishRecentStoryWithCircleId:(int )circleId content:(NSString *)content  data:(NSString *) data labels:(NSString *) labels  recentType:(int) recentType askedUid:(int) askedUid vedioData:(NSString *)vedioData locationData:(NSString *) locationData
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"content"] = content;
    subscript[@"data"] = data;
    subscript[@"labels"] = labels;
    subscript[@"recentType"] = @(recentType);
    subscript[@"vedioData"] = vedioData;
    subscript[@"locationData"] = locationData;
    if (recentType == 2) {
          subscript[@"askedUid"] = @(askedUid);
    }
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_PUBLISHRECENTSTORY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHMoment class]];
}


-(RACSignal *) getMyQuestionCountWithCircleId:(int) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETMYQUESTIONCOUNT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


//MH_POST_Recent_SEARCHRECENTBYCONTENTPAGEDLIST
-(RACSignal *) searchRecentByContentPagedListWithText:(NSString *) searchText pageNum:(int)pageNum pageSize:(int)pageSize circleId:(int) circleId;
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"searchTxt"] = searchText;
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_SEARCHRECENTBYCONTENTPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHSerchMoment class]];
}


-(RACSignal *) getRecentNotificationPagedListPageNum:(int)pageNum pageSize:(int)pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_RECENTNOTIFICATION_GETRECENTNOTIFICATIONPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHMessageNotification class]];
}

//

-(RACSignal *) answerCircleQuestionsWithRecentId:(int )recentId content:(NSString *)content  lon:(double ) lon  lat:(double )lat
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"content"] = content;
    subscript[@"lon"] = @(lon);
    subscript[@"lat"] = @(lat);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_RECENTNOTIFICATION_ANSWERCIRCLEQUESTIONS parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHMoment class]];
}


//点赞
-(RACSignal *) likeRecentStoryWithRecentId:(int )recentId type:(int) type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"type"] = @(type);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_LIKERECENTSTORY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


/**
 添加收藏

 @param recentId 动态ID
 @return 添加收藏返回的信号
 */
-(RACSignal *) addRecentCollectMarkWithRecentId:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_ADDRECENTCOLLECTMARK parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


-(RACSignal *) cancelCollectMarkWithRecentId:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_CANCELCOLLECTMARK parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


/**
 删除收藏

 @param collectId 收藏ID
 @return 删除收藏返回的动态
 */
-(RACSignal *) deleteCollectMarkWithCollectId:(int )collectId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"collectId"] = @(collectId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_ADDRECENTCOLLECTMARK parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


//发表评论

-(RACSignal *) publishCommentWithRecentId:(int )recentId content:(NSString *) content  parentId :(int ) parentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"content"] = content;
    subscript[@"parentId"] = @(parentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_PUBLISHCOMMENT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHComment class]];
}

//删除主题
-(RACSignal *) deleteRecente:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_DELETERECENTSTORY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

//置顶主题
-(RACSignal *) topRecente:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Recent_SETRECENTSTORYTOP parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


/**
 取消置顶

 @param recentId 动态ID
 @return 执行的信号
 */
-(RACSignal *) cancelTopRecente:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_RECENT_CANCELRECENTSTORYTOP parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


//取消精华
-(RACSignal *) essenceRecente:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_RECENT_SETRECENTSTORYESSENCE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

//精华
-(RACSignal *) cancelEssenceRecente:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_RECENT_CANCELRECENTSTORYESSENCE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}




-(RACSignal *) fetchCircleAppAttrList{
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCIRCLEAPPATTRLIST parameters:nil];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleTag class]];
}


-(RACSignal *) fetchCircleCoverList{
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETCIRCLECOVERLIST parameters:nil];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCoverModel class]];
}


#pragma mark Members


-(RACSignal *) pullCircleMemberBlack:(int )circleId userId:(int) userId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"userId"] = @(userId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_PULLCIRCLEMEMBERBLACK parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


-(RACSignal *) auditMemberJoinWithAuditId:(int )auditId auditType:(MHAuditStatus ) auditType
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(auditId);
    subscript[@"userId"] = @(auditType);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_AUDITMEMBERJOIN parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}




-(RACSignal *) cancelCircleMemberBlack:(int )memberId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_CANCELCIRCLEMEMBERBLACK parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


-(RACSignal *) fetchCircleQrCodeWith:(int) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_SHARECIRCLEQR parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:MHQRCodeModel.class];
}




-(RACSignal *) deleteCircleMember:(int )memberId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_DELETECIRCLEMEMBER parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) setCircleMemberIdentType:(int )memberId identType:(int) identType
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    subscript[@"identType"] = @(identType);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_SETCIRCLEMEMBERIDENTTYPE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) cancelCircleMemberIdentType:(int) memberId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_CANCELCIRCLEMEMBERIDENTTYPE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) editCircleMemberQAinfo:(int) memberId txt:(NSString *) txt
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"memberId"] = @(memberId);
    subscript[@"txt"] = txt;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_EDITCIRCLEMEMBERQAINFO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}



-(RACSignal *) getAuditMemberListWithCircleId:(int )circleId pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_GETAUDITMEMBERLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCircleMember class]];
}

-(RACSignal *) auditMemberJoin:(int) auditId  auditType:(int) auditType
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"auditId"] = @(auditId);
    subscript[@"auditType"] = @(auditType);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Member_AUDITMEMBERJOIN parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) getFindRecentPagedListWithType:(int) type  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"type"] = @(type);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Discover_GETFINDRECENTPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHDiscoverHomeModel class]];
}

-(RACSignal *) getAppAdvertList{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Discover_GETAPPADVERTLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHBanner class]];
}


-(RACSignal *) getHelpTipsList{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_OTHER_GETHELPTIPSLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHHelperModel class]];
}

-(RACSignal *) addSuggestWithUserId:(int )userId sugTxt:(NSString *) sugTxt
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"userId"] = @(userId);
    subscript[@"sugTxt"] = sugTxt;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_OTHER_ADDSUGGEST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}


-(RACSignal *) bindTelephoneWithTelephone:(NSString *)telephone verifyCode:(NSString *) verifyCode
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"telephone"] = telephone;
    subscript[@"verifyCode"] = verifyCode;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_BINDTELEPHONE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) createVerifyCode:(NSString *)telephone
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"telephone"] = telephone;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_CREATEVERIFYCODE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}



-(RACSignal *) changeBindTelephone:(NSString *)newTelephone   newVerifyCode:(NSString *) newVerifyCode oldVerifyCode:(NSString *) oldVerifyCode
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"oldVerifyCode"] = oldVerifyCode;
    subscript[@"newTelephone"] = newTelephone;
    subscript[@"newVerifyCode"] = newVerifyCode;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_CHANGEBINDTELEPHONE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) shareRecentStoryWithCircleId:(int )circleId   recentId:(int ) recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"recentId"] = @(recentId);
//    subscript[@"newVerifyCode"] = newVerifyCode;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_SHARERECENTSTORY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHshareRecent class]];
}



-(RACSignal *) fetchDownloadAppH5
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
        subscript[@"uniqueID"] = [MHHTTPService sharedInstance].currentUser.uniqueID;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_OTHER_DOWNLOADAPPH5 parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHDownLoadH5 class]];
}

//没有带参数，所以没有返回为空
-(RACSignal *) getAuthorizationStatus
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_OTHER_GETAUTHORIZATIONSTATUS parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:nil] mh_parsedResults];
}

-(RACSignal *) getShareWxFriendStatus
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_OTHER_GETSHAREWXFRIENDSTATUS parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:nil] mh_parsedResults];
}


-(RACSignal *) getSystemMgsPagedListWithPageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USEREXT_GETSYSTEMMGSPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHSystemMessageModel class]] mh_parsedResults];
}


-(RACSignal *) getRewardActivityInfoWithCircleId:(int) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_PUBLISHREWARDACTIVITY parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHRewardActivityInfo class]] mh_parsedResults];
}

//收入支出
-(RACSignal *) getUserPurseDetailPagedListWithPageNum:(int) pageNum pageSize:(int) pageSize type:(int) type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    subscript[@"type"] = @(type);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_GETUSERPURSEDETAILPAGEDLIST parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHPurseDetail class]] mh_parsedResults];
}



-(RACSignal *) getFindRecentListByNewRule:(int) oprtType reFlashTime:(NSString *) reFlashTime
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"oprtType"] = @(oprtType);
    subscript[@"reFlashTime"] = reFlashTime;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETFINDRECENTLISTBYNEWRULE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHDiscoverHomeModel class]];
}


-(RACSignal *) getNearbyRecentPagedListWithPageNum:(int) pageNum pageSize:(int) pageSize locationLat:(CGFloat )locationLat
                                       locationLon:(CGFloat )locationLon
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"locationLat"] = @(locationLat);
    subscript[@"locationLon"] = @(locationLon);
    
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETNEARBYRECENTPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHDiscoverHomeModel class]];
}


-(RACSignal *) getUserPurseInfo
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];

    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_GETUSERPURSEINFO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHPurseInfo class]];
}

-(RACSignal *) getCarhOprtInfo
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_GETCARHOPRTINFO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCarhOprtInfo class]];
}

-(RACSignal *) addWeiXinPayAccountWith:(NSString *)realName idCard:(NSString *) idCard
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"realName"] = realName;
    subscript[@"idCard"] = idCard;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USEREXT_ADDWEIXINPAYACCOUNT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}



-(RACSignal *) addCashDetailWithAmount:(CGFloat )amount
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"amount"] = @(amount);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_ADDCASHDETAIL parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:nil];
}

-(RACSignal *) getUserCashDetailPagedListWithPageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_GETUSERCASHDETAILPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHCashDetailInfo class]];
}


-(RACSignal *) searchCirclePagedListWithTitle:(NSString *)title pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"title"] = title ;
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_SEARCHCIRCLEPAGEEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHSearchCircleModel class]];
}



//MH_POST_CIRCLE_GETNEWMENBERPAGEDLIST

-(RACSignal *) getNewMenberPagedListWithPageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETNEWMENBERPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHMessageNotification class]];
}

-(RACSignal *) getUserRecentLikePagedList:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETUSERRECENTLIKEPAGELIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAttributeModel class]];
}


-(RACSignal *) getJoinCirclePriceRange
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_GETJOINCIRCLEPRICERANGE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHPriceRange class]];
}

-(RACSignal *) modifyUserProfileWithHeadPic:(NSString *) headPic nickName:(NSString *)nickName
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"headPic"] = headPic;
    subscript[@"nickName"] = nickName;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_MODIFYUSERPROFILE parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHPriceRange class]];
}


-(RACSignal *) updateRecentViewCountWithVideoId:(int) videoId recentId:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"videoId"] = @(videoId);
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPDATERECENTVIEWCOUNT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHPriceRange class]];
}



-(RACSignal *) getRecentInfoByNewVideoWithRecentId:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETRECENTINFOBYNEWVIDEO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}

-(RACSignal *) getNewVideoRecentInfoByHistoryRedWithRecentId:(int )recentId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETNEWVIDEORECENTINFOBYHISTORYRED parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}




//-(RACSignal *) getRecentInfoByNewVideoWithRecentId:(int )recentId isRedPacket:(BOOL)isRedPacket
//{
//    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
//    subscript[@"recentId"] = @(recentId);
//    subscript[@"isRedPacket"] = @(isRedPacket);
//    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETRECENTINFOBYNEWVIDEO parameters:subscript.dictionary];
//    return [[MHHTTPRequest requestWithParameters:paramters]
//            enqueueResultClass:[MHAwemeModel class]];
//}


-(RACSignal *) getRecentVideoPagedListByNearbyWithRecentId:(int )recentId locationLon:(CGFloat ) locationLon locationLat:(CGFloat) locationLat pageNum:(int) pageNum pageSize:(int) pageSize n:(int)n
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"locationLon"] = @(locationLon);
    subscript[@"locationLat"] = @(locationLat);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    subscript[@"n"] = @(n);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETRECENTVIDEOPAGEDLISTBYNEARBY parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}





-(RACSignal *) getRecentListByNewVideoWithRecentId:(int )recentId  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_Discover_GETRECENTLISTBYNEWVIDEO parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}

//收藏
-(RACSignal *) getRecentVideoPagedListByUserCollectWithMarkId:(int )markId  pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"markId"] = @(markId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETRECENTVIDEOPAGEDLISTBYUSERCOLLECT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}


-(RACSignal *) getRecentPagedListByNewVideoTimeDescWithRecentId:(int )recentId circleId:(int)circleId   pageNum:(int) pageNum pageSize:(int) pageSize
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"circleId"] = @(circleId);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETRECENTPAGEDLISTBYNEWVIDEOTIMEDESC parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}

-(RACSignal *) updateRecentShareCountWithRecentId:(int )recentId type: (int) type
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"recentId"] = @(recentId);
    subscript[@"type"] = @(type);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CIRCLE_UPDATERECENTSHARECOUNT parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHAwemeModel class]];
}


-(RACSignal *) getNearbyCirclePagedListWithLocationLat:(float )locationLat locationLon:(float) locationLon pageNum:(int) pageNum pageSize:(int) pageSize;
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"locationLat"] = @(locationLat);
    subscript[@"locationLon"] = @(locationLon);
    subscript[@"pageNum"] = @(pageNum);
    subscript[@"pageSize"] = @(pageSize);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_SQUARE_GETNEARBYCIRCLEPAGEDLIST parameters:subscript.dictionary];
    return [[MHHTTPRequest requestWithParameters:paramters]
            enqueueResultClass:[MHNearByModel class]];
    
}


-(RACSignal *) getUserCirclePushStatus
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_GETUSERCIRCLEPUSHSTATUS parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:nil] mh_parsedResults];
}

-(RACSignal *) userLocationWithLocation:(CLLocation *)location
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"lon"] = @(location.coordinate.longitude);
    subscript[@"lat"] = @(location.coordinate.latitude);
        MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_INITUSERLOCATION parameters:subscript.dictionary];
        return [[[MHHTTPRequest requestWithParameters:paramters]
                 enqueueResultClass:nil] mh_parsedResults];
}

-(RACSignal *) appFuQinJoinCircleWithCircleId:(int) circleId openid:(NSString *)openId inviteUserKey:(NSString *)inviteUserKey
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    subscript[@"inviteUserKey"] = inviteUserKey;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_MONEY_WXAPPPAYJOINCIRCLE parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHFuQian class]] mh_parsedResults];

}

-(RACSignal *) getUserBindInviteCode
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];

    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_GETUSERBINDINVITECODE parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHBindInviterModel class]] mh_parsedResults];

}


-(RACSignal *) bindUserInviteCodeWithInviteCode:(NSString *) inviteCode

{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"inviteCode"] = inviteCode;
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_USER_BINDUSERINVITECODE parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHBindInviterModel class]] mh_parsedResults];
}


-(RACSignal *) getChatCircleSimpleInfoWithCircleId:(int ) circleId
{
    MHKeyedSubscript *subscript = [MHKeyedSubscript subscript];
    subscript[@"circleId"] = @(circleId);
    MHURLParameters *paramters = [MHURLParameters urlParametersWithMethod:MH_HTTTP_METHOD_POST path:MH_POST_CHATCIRCLE_GETCHATCIRCLESIMPLEINFO parameters:subscript.dictionary];
    return [[[MHHTTPRequest requestWithParameters:paramters]
             enqueueResultClass:[MHCircleSimpleInfo class]] mh_parsedResults];
    
}




@end
